/**
 * @Description:
 * @Author BPF
 * @create 2021/10/6 14:23
 */
import { isFunction, requireAllModule } from '@bianpengfei/utils'
export default {
  install: (app) => {
    /**
     * 注册所有指令
     */
    requireAllModule({
      requireContext: require.context('./modules/', true, /\.js$/),
      exclude: ['./modules/index.js']
    }).forEach(([v]) => {
      if (isFunction(v?.default?.install)) {
        app.use(v?.default)
      }
    })
  }
}
